package jus.aoo.lisp;

public class Cdr extends Subr implements ParamEvaluable{
public static Cdr CDR = new Cdr();

	
	public Sexpr apply(Scons e) throws LispException{
		Sexpr a = e.car();
		Sexpr b = e.cdr();
		if ( b instanceof Nil && a instanceof Sexpr) {
			return a.cdr();
		}
		throw new LispException("Erreur Cdr");
	}
	
	public String toString(){
		return "cdr";
	}
}
